package health;

import com.codahale.metrics.health.HealthCheck;

/**
 * Created by fin on 2017/7/8.
 */
public class TestHealthCheck extends HealthCheck{

    private final String name;


    public TestHealthCheck(String name){
        this.name = name;
    }

    protected Result check() throws Exception {
        final String t = "keyverify";
        if(!t.contains(name)){
            return Result.unhealthy("something wrong");
        }
        return Result.healthy();
    }
}
